#include <iostream>
#include <unistd.h>
#include <time.h>
#include "ThreadPool.hpp"
using namespace std;
void Print()
{
}
int main()
{
    srand(time(nullptr) ^ getpid());
    threadpool<task> *tp = new threadpool<task>(5, Print);
    tp->Start();
    //
    while (true)
    {
        int x = rand() % 10 + 1;
        int y = rand() % 9;
        char op = opers[rand() % opers.size()];
        task t(x, y, op);
        tp->Push(t);
        cout << "main thread make a task:" << t.show() << endl;
        sleep(1);
    }
    return 0;
}